# -*- coding: utf-8 -*-
from flask import Blueprint, render_template, g

from common.libs.render_helper import ops_render

route_index = Blueprint('index_page', __name__)


@route_index.route("/")
def index():
    # # 定义当前的用户对象
    # user_info = g.current_user
    # # 设置字典才能给模板页面渲染
    # context = {"user_info": user_info}
    # # 直接user_info=user_info传值到模板也可以
    # # return render_template("index/index.html", user_info=user_info)
    # return render_template("index/index.html", **context)
    # # return render_template("index/index.html")

    # 优化:直接导入rende_helper模块封装render_template函数，实现自带用户信息参数
    return ops_render('index/index.html')